package com.greydawn.DecoratorPattern;

/**
 * @author zhongwr
 * @date 2021-12-09 10:31:37
 * @description 鱼肉类
 */
public class DishesFish extends Dishes {

//    public DishesFish(Order order) {
//        super(order);
//    }

    @Override
    public void show() {
        order.show();
        add(order);
    }

    @Override
    public double countPrice() {
        return 20 + order.countPrice();
    }

    private void add(Order order) {
        System.out.println("鱼肉一份 20元");
    }

    @Override
    public void addFood(Order order) {
        this.order = order;
    }
}
